home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d1 / amac34.arc / SRCH22.QM < prev    next >
Text File  |  1991-02-16  |  52KB  |  1,071 lines

  1. *                               (SRCH22).QM
  2. *┌─────────────────[ (INDEX) Search/Replace Macros ]───────────────────────────┐
  3. *│
  4. *│^(f1_) Find multiple search text in current file, uses FGREP           <-new
  5. *│^(f2_) Find multiple search text in current file, uses Dos FIND        <-new
  6. *│
  7. *│@(7) - Srch ONLY from command line, loads files w/SRL.BAT, no replace  <-chg
  8. *│@(0) - Srch/rplc from command line, loads files w/SR.BAT,  no prompt
  9. *│@(1)─┐ Makes FileList of files containing search text while editing    <-chg
  10. *│@(2)─┤ Loads FileList of files containing search text while editing
  11. *│@(8)─┘ Srch/rplc while editing loaded files only, prompts,
  12. *│       saves ONLY & keeps loaded ONLY files w/replacements.
  13. *│@(5) - Srch/rplc while editing, finds/loads files, prompts             <-chg
  14. *│@(9) - Srch ONLY loaded files, keep loaded ONLY files w/ found text
  15. *│
  16. *│(F4) - RepeatFind
  17. *│(F5) - PrevFile                                                        <-new
  18. *│(F6) - NextFile
  19. *│
  20. *│@(a)   Moves cursor to first word delimiter after wordleft
  21. *│@(f)   Moves cursor to first word delimiter after wordright
  22. *│^(a_)  Moves cursor to first character of wordleft
  23. *│^(f_)  Moves cursor to first character of wordright
  24. *│@(h) - Select Index item with cursor line, then <enter>.
  25. *│
  26. *│(CursorLeft)  Wrap cursor to previous line like Wordstar does
  27. *│(CursorRight) Wrap cursor to next       "    "     "       "
  28. *│             [These two macros were written by Tim Farley]
  29. *│
  30. *│(Index) Use      - How to locate macro or item below from Index using @h
  31. *│(Description)    - Search/Replace Macros
  32. *│(Startup)        - What's required
  33. *│(Macros)         - Search/Replace Macros
  34. *│(Other) Macros   - not included
  35. *│(Version) history
  36. *└────────[ be sure to leave at least one blank line at end of Index  ]────────┘
  37.  
  38.  
  39. *                Confirms  Saves    Must Be
  40. *                Replace-  Loaded   First                       Byte
  41. * Key Run While  ment?     Files?   Macro?      Comments        Size
  42. * ──  ─────────  ────────  ──────   ────── ───────────────────  ────
  43. * @7  cmnd line  n/a       n/a      yes    load only w/SRL.bat   83
  44. * @0  cmnd line  no        yes      yes    s/r w/SR.bat         153
  45. * @1─┐editing    n/a       n/a      no     makes FileList only   99
  46. * @2─┤editing    n/a       n/a      no     loads files only      19
  47. * @8─┘editing    yes       rpl only no     s/r loaded files      41
  48. * @5  editing    yes       rpl only no     s/r finds files      235
  49. * @9  editing    srch only no       no     s/o loaded files      40
  50. * @h  editing    -         -        -      Help locate macros    47
  51.  
  52. * (Index) Use;
  53. *
  54. * To locate a macro or item in this file, press @h, place the cursor
  55. * line on the desired item in the Index above, and press <enter>.
  56. * See BOOK15.QM for more details.
  57.  
  58.  
  59. * (Description):
  60. *
  61. * (SRCH22) are QEdit macros to search/replace only files containing
  62. * search text from a FileList of file search patterns. Only files
  63. * containing the search text are loaded automatically, and then the
  64. * desired search/replace is performed. Search/replace may also be run
  65. * from the command line and while editing files.
  66.  
  67. * To BEGIN, just type "START SRCH" <Enter>. All pertinent files will be
  68. * loaded in the "Ring" for viewing, and SRCH22.MAC is read.
  69. * Alternatively, type "START SRCH 0" <Enter> and the disk copies of all
  70. * files in the "Ring" will be loaded ready for editing, saving time.
  71.  
  72. * (Startup):
  73. *
  74. * In order for the search/replace macros to run, first  make a
  75. * FileList, SRCH-FG.LST, of the file patterns to be searched.
  76. * Here's mine:
  77.  
  78. *         *.qm
  79. *         *.ql
  80. *         *.inf
  81. *         *.bat
  82. *         *.lst
  83. *         *.me
  84. *         *.doc
  85. *         *.syn
  86. *         e:\syn\sa.syn
  87. *         u:\sr?.bat
  88.  
  89.  
  90. * The SA.SYN entry is my PCED synonym file.
  91.  
  92. * You may want to consider putting only one single file name in the list
  93. * to try these macros, eg TEST.QM.
  94.  
  95. * To perform a search/replace from the command line, type SR, and
  96. * answer the prompts for search and replace text. To perform a SEARCH
  97. * ONLY from the command line, type SRL, and answer the prompts for
  98. * search text. All searches with these macros and batch files are
  99. * non-case sensitive. To perform a case sensitive search, change "GIN"
  100. * to "GN"in the macros below and "-f" to "-fc" in the batch files.
  101.  
  102. * Chris Dunford's excellent FGREP and William Parke's INPUT.COM must be
  103. * located in the path. FGREP can be found on CompuServe IBMAPP Lib 1 as
  104. * FGREP.ARC, v1.71, and on Exec-PC as FGREP172.ZIP. INPUT can be found
  105. * on Exec-PC as INPUT.ZIP. They are probably on many other BBS's also.
  106.  
  107. * When using SR.BAT or SRL.BAT, the message "0 Files copied" means no
  108. * files were found containing the search text, and the macro stops with
  109. * the file c:! loaded but it contains no output from FGREP.
  110.  
  111. * Search and replacement text may be single or multiple words only
  112. * when answering search and replacement prompts, not from the command
  113. * line.
  114. *
  115. * Replacing C: with your ram disk will make the macros run faster.
  116.  
  117. * Alt_0/7 set and use the Dos environment variables FGS and FGR. The
  118. * letters "FGS" and "FGR" must NOT occur in any other Dos environment
  119. * variable name or value. You must have enough environment space to
  120. * store both the search and replacement text.
  121.  
  122. * QEdit must be named Q.EXE.
  123.  
  124. * Insert should be ON.
  125.  
  126. * For (other) macros, see ALLMACRO.INF.
  127.  
  128. * These macros require "QEdit and QMAC v2.1, February, 1990" or later.
  129.  
  130. * (QQQ www for search/replace test)
  131.  
  132. * (Macros):--------------------------------------------------------
  133. *
  134. *┌─────────────────────────────────────────────────────────────────────┐
  135. *│ @(0) Macro for search/replace from command line with SR.BAT         │
  136. *└─────────────────────────────────────────────────────────────────────┘
  137. *  ******** MUST BE FIRST MACRO IN FILE FOR START UP IN SR.BAT*********
  138. *            ****** MUST RUN SR.BAT TO USE THIS MACRO******
  139. *
  140. * To do a search/replace from command line, just type SR, and answer
  141. * prompts for search and replacement text.
  142. *
  143. * TEST.QM is included to show how this macro works. Type/enter at the
  144. * command line as follows:
  145. *
  146. *  1.   "SR"  <enter>
  147. *  2.   "aaa" space "bbb" <enter>   (answer SEARCH text prompt)
  148. *  3.   "aaa" space "BBB" <enter>   (answer REPLACEMENT text prompt)
  149. *  4.   "GIN" <enter>               (answer REPLACEMENT option prompt)
  150.  
  151. * This version of @0 also uses the "Once-Around the ring" technique of
  152. * Kyle Watkins. This macro is smaller and faster than Version 1.8 and
  153. * prior because files are loaded by NextFile rather than EditFile, and
  154. * SET >c:$ is moved to the SR.BAT batch file from the macro.
  155.  
  156. * When finished running with the batch file or PCED, the following
  157. * files are loaded for viewing or editing:
  158. *
  159. * Window 1       -nul file
  160. * Window 2...n+1 -files containing search text, n = (# files found)
  161. *
  162. *
  163. * Temporary file names are:
  164. *
  165. * c:$.ql  List of files found & search text (output from FGREP)
  166. * c:!     Same as c:$.ql
  167. * c:$     Output of Dos SET.
  168. * _       NUL file (NUL file is also ! in some other macros)
  169.  
  170. * When using SR.BAT or SRL.BAT, the message "0 Files copied" means no
  171. * files were found containing the search text, and the macro stops with
  172. * the file c:! loaded but it contains no output from FGREP.
  173. *
  174. @0      MacroBegin
  175. ***************************************** LOAD FILES
  176.         altwordset                      * For all file names
  177.         endfile                         * Get to end of file
  178.  LOADAGAIN:                             *
  179.         unmarkblock                     * Unmark last file name
  180.         find #42 "Fi" return "B"  return* Find file name
  181.  jfalse  END:                           * No find ? quit
  182.         wordright                       * Move to space
  183.         wordright                       * Move to file name
  184.         markcolumn                      * Mark it
  185.         endline                         * Get all name in block
  186.         copy                            * Copy file name to scrap
  187.         EditFile                        * Get ready to load
  188.         CurrentFilename " "             * To force return *here*
  189.         Paste Return                    * Paste file name & do it!
  190.         cursorup                        * Go to next line
  191.  jfalse ENDLOAD:                        * No more filenames? Done load
  192.  jump LOADAGAIN:                        * Check again
  193.  ENDLOAD:                               *
  194.         quit                            * Quit c:! from ring so no rplc
  195. ***************************************** GET SEARCH TEXT TO SCRATCH
  196.         editfile "c:$" return           * Load set output file
  197.         find  "FGS" return return       * Find FGS
  198.         wordright                       * Get to SEARCH text
  199.         markcolumn                      * Begin mark
  200.         endline                         * Mark SEARCH text
  201.         cursorleft                      * No trailing space in block
  202.         storescrbuff "FGS" return       * Store SEARCH text to scratch
  203. ***************************************** GET REPLACE TEXT TO SCRATCH
  204.         unmarkblock                     * Get ready
  205.         begfile                         * Get to top
  206.         find  "FGR" return return       * Find FGR
  207.         wordright                       * Get to REPLACE text
  208.         markcolumn                      * Begin mark
  209.         endline                         * Mark it all
  210.         cursorleft                      * No trailing space in block
  211.         storescrbuff "FGR" return       * Store REPLACE text to scratch
  212.         killfile                        * Kill c:$ for next time
  213.         quit                            * Remove c:$ from ring
  214. ***************************************** BEGIN SEARCH/REPLACE
  215.         Editfile "_" Return             * Insert -or- GoTo NUL File
  216.         getscrbuff "FGS" return cut     * Cut search text from scratch
  217.         Find paste Return escape        * Initialize find prompt
  218.         getscrbuff "FGR" return cut     * Cut replace text from scratch
  219.         FindReplace return              * Begin replacement
  220.         paste return                    * paste REPLACEMENT text
  221. **         "GIN" Return                    ** Replace, no prompt
  222.         Pause Return                    * Allow user input of Options
  223.         Begline Cursorright      * Put cursor in Col. 2 of NUL File
  224.         LOOP:                    * Main test loop
  225.             Nextfile             * Move to next files in Ring
  226.             Cursorleft           * Move cursor left (need for NUL test)
  227.             Jfalse DOIT:         * If couldn't move to left, it's not
  228.                                  * the NUL File AND cursor position
  229.                                  * has not changed -- GO with the
  230.                                  * FindReplace
  231.                                  *ELSE
  232.                                  * Check to see if in the NUL File
  233.             Cursorleft           * Move cursor left for NUL Test
  234.             Jfalse ENDLOOP:      * If couldn't move left -- We
  235.                                  * ARE in the NUL File and Need
  236.                                  * to ENDLOOP
  237.                                  *ELSE
  238.             Cursorright          * Move back to Col. 2 in NUL File
  239.         DOIT:                    * FindReplace Loop
  240.             BegFile              * Move up in case cursor is below find
  241.             Repeatfind           * Do the FindReplace
  242.             Jtrue SAVE:          * If CHANGES are made -- SAVE the File
  243.             Quit                 * If NO CHANGES are made -- QUIT the
  244.                                  * File
  245.             Jump LOOP:           * Return to the Main Loop
  246.         SAVE:                    * Routine to Save a File with Changes
  247.             Savefile             * Save the file
  248.             Jump LOOP:           * Return to Main Loop
  249.         ENDLOOP:                 * Loop is DONE
  250.             Quit                 * Quit the NUL File
  251.   END:                           *
  252.         defaultwordset           * set default
  253. *
  254. * 191 bytes Sun  09-16-1990  15:09:40
  255. * 153 bytes Tue  10-02-1990  18:50:33
  256.  
  257.  
  258.  
  259.  
  260.  
  261. *┌─────────────────────────────────────────────────────────┐
  262. *│ @(1) - makes FileList of files containing search text   │
  263. *└─────────────────────────────────────────────────────────┘
  264. @1      MacroBegin
  265.         Dos 'FGREP -f0 /'               * Make FileList        |v2.2
  266.         Pause                           *
  267.         '/>c:! @SRCH-FG.lst'            *                      |v2.2
  268.         return return                   *
  269.         editfile "c:!" return quit      * Edit FileList
  270.         editfile return                 *
  271.         begfile                         *
  272.         MarkColumn                      * Mark begfile c:!
  273.         endfile begline                 * Mark endfile col 1
  274.         wordright wordright             * Get to file name
  275.         cursorleft                      * Move off file name
  276.         DeleteBlock                     * Delete file name
  277.         SaveFile                        * Save FileList
  278.         begfile                         * Get to begin
  279.         MarkColumn                      * Mark begfile c:!
  280.         EndFile                         * Get to end
  281.         gotocolumn "12" return          * Get all file names in block
  282.         Sort                            * Sort FileList
  283.         killfile                        * Kill c:!
  284.         begfile                         * See FileList
  285.         unmarkblock                     * Without block mark
  286. *
  287. * 99 bytes Thu  09-13-1990  16:30:45
  288. * 99 bytes Sat  02-16-1991  15:40:01
  289.  
  290.  
  291.  
  292. *┌──────────────────────────────────────────────────────────────┐
  293. *│ @(2) - loads FileList of files containing search text        │
  294. *└──────────────────────────────────────────────────────────────┘
  295. * Written by Kyle Watkins, SemWare.
  296. *
  297. @2      MacroBegin
  298. ***************************************** LOAD FileList (from QLSTxx)
  299.         EndFile BegLine                 * Start at last line
  300.  REPEAT:
  301.         UnmarkBlock MarkLine Copy       * Grab this name
  302.         EditFile                        * Get ready to load
  303.         CurrentFilename " "             * To force return *here*
  304.         Paste Return                    * Paste file name & do it!
  305.         CursorUp                        * More lines above?
  306.         JTrue REPEAT:                   * If yes, repeat.
  307. *
  308. * 19 bytes Mon  09-03-1990  00:56:04
  309.  
  310.  
  311.  
  312.  
  313. *┌───────────────────────────────────────────────────────────────────┐
  314. *│ @(5) Makes and loads FileList of files containing search text,    │
  315. *│      then search/replace loaded files while editing               │
  316. *└───────────────────────────────────────────────────────────────────┘
  317. *
  318. @5     MacroBegin
  319. ***************************************** GET SEARCH TEXT
  320.         unmarkblock                     *
  321.         Editfile '!' Return             * Insert -or- GoTo NUL File
  322.        "Search Text=" markcolumn pause  * Search text?
  323.         storescrbuff "1" return copy    * Copy search text to scrap
  324. ***************************************** GET REPLACE TEXT
  325.         RETURN                          * Move to next line
  326.        "Replace Text=" markcolumn pause * Replacement text?
  327.         storescrbuff "2" return         * Store replacement to scratch
  328.         quit                            * Quit NUL
  329. ***************************************** MAKE FileList
  330.         DOS 'FGREP -f0 /'               * Make FileList        |v2.2
  331.         paste                           * Paste search text
  332.         '/>c:! @SRCH-FG.lst'            *                      |v2.2
  333.         return return                   *
  334.         editfile "c:!" return quit      * Edit FileList
  335.         editfile return                 *
  336.         begfile MarkColumn              * Mark begfile c:!
  337.         endfile begline                 * Mark endfile col 1
  338.  jfalse END:                            * End if no search text found
  339.         wordright wordright             * Get to file name
  340.         cursorleft                      * Move off file name
  341.         DeleteBlock                     * Delete file name
  342.         begfile                         * Get to begin
  343.         MarkColumn                      * Mark begfile c:!
  344.         EndFile                         * Get to end
  345.         gotocolumn "12" return          * Get all file names in block
  346.         Sort                            * Sort FileList
  347. ***************************************** LOAD FileList (from QLSTxx)
  348.         EndFile BegLine                 * Start at last line
  349.  REPEAT:
  350.         UnmarkBlock MarkLine Copy       * Grab this name
  351.         EditFile                        * Get ready to load
  352.         CurrentFilename " "             * To force return *here*
  353.         Paste Return                    * Paste file name & do it!
  354.         CursorUp                        * More lines above?
  355.         JTrue REPEAT:                   * Yes ? repeat
  356.         killfile                        * Kill c:!
  357.         quit                            * Quit c:!
  358.         Editfile '!' Return             * Insert -or- GoTo NUL File
  359.         getscrbuff "1" return cut       * Cut search text from scratch
  360.         Find paste Return escape        * Initialize find prompt
  361.         getscrbuff "2" return cut       * Cut replace text from scratch
  362.         FindReplace return              * Begin replacement
  363.         paste RETURN                    * paste REPLACEMENT text
  364. **         "GIN" Return                    ** Replace, no prompt
  365.         Pause Return                    * Allow user input of Options
  366.         Begline Cursorright      * Put cursor in Col. 2 of NUL File
  367.         LOOP:                    * Main test loop
  368.             Nextfile             * Move to next files in Ring
  369.             Cursorleft           * Move cursor left (need for NUL test)
  370.             Jfalse DOIT:         * If couldn't move to left, it's not
  371.                                  * the NUL File AND cursor position
  372.                                  * has not changed -- GO with the
  373.                                  * FindReplace
  374.                                  *ELSE
  375.                                  * Check to see if in the NUL File
  376.             Cursorleft           * Move cursor left for NUL Test
  377.             Jfalse END:          * If couldn't move left -- We
  378.                                  * ARE in the NUL File and Need
  379.                                  * to END the Macro
  380.                                  *ELSE
  381.             Cursorright          * Move back to Col. 2 in NUL File
  382.         DOIT:                    * FindReplace Loop
  383.             BegFile              * In case cursor is below find
  384.             Repeatfind           * Do the FindReplace
  385.             Jtrue SAVE:          * If CHANGES are made, SAVE the File
  386.             Quit                 * If NO CHANGES are made, QUIT the File
  387.             Jump LOOP:           * Return to the Main Loop
  388.         SAVE:                    * Routine to Save a File with Changes
  389.             Savefile             * Save the file
  390.             Jump LOOP:           * Return to Main Loop
  391.         END:                     * Macro is DONE
  392.             Quit                 * Quit the NUL File
  393. *
  394. * 260 bytes Sun  09-16-1990  14:48:58
  395. * 235 bytes Tue  10-02-1990  23:05:35
  396. * 235 bytes Sat  02-16-1991  15:40:17
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403. * ┌──────────────────────────────────────────────────────────────────┐
  404. * │ @(7) -Start up macro, loads only found files, no replacement     │
  405. * └──────────────────────────────────────────────────────────────────┘
  406. * *** IF USED, MUST BE FIRST MACRO FOR START UP WITH SRL.BAT or PCED***
  407. * ****** MUST RUN SRL.BAT OR PCED TO USE THIS MACRO******
  408.  
  409.  
  410. * To run, type SRL at the command line and answer prompt for search
  411. * text. After the files containing the search text are loaded, press  |
  412. * F4 to highlight first occurence of search text. Press F6 then F4 to |v2.2
  413. * highlight first occurence of search text in first file containing   |
  414. * search text.                                                        |
  415. *
  416. *
  417. * SRL.BAT will accept SRL [search text] as long as [search text] is a
  418. * SINGLE word. This bypasses the need to respond to the INPUT prompt
  419. * for Search Text=. (added in v1.4)
  420. *
  421. * An alternative to using the batch file SRL.BAT is to use the
  422. * following PCED synonym instead:
  423. *
  424. * SYN     SRLFG 'echo off^break on^FGREP -f "&A" @SRCH-FG.LST >c:!
  425. *                ^Q. c:! /Esrl.mac /LSRCH22.mac^break off^echo on'
  426. *
  427. * Just add this synonym to the bottom of your synonym file on one line,
  428. * or type CED SYN SRLFG 'echo ...............'.
  429. *
  430. * To run using PCED, type SRLFG [search text] at the command line.
  431. *
  432. * When finished running with the batch file or PCED, the following
  433. * files are loaded for viewing or editing:
  434. *
  435. * Window 1       -list of files found & search text (output from FGREP)
  436. * Window 2...n+1 -files containing search text, n = (# files found)
  437. *
  438. *
  439. * Temporary file names are:
  440. *
  441. * c:$.ql  List of files found & search text (output from FGREP)
  442. * c:!     Same as c:$.ql
  443. * c:$     Output of Dos SET
  444. *
  445. * When using SR.BAT or SRL.BAT, the message "(0) Files copied" means no
  446. * files were found containing the search text, and the macro stops with
  447. * the file c:! loaded but it contains no output from FGREP.
  448. *
  449. @7 macrobegin
  450. ***************************************** LOAD FOUND FILES
  451.         altwordset                      * For all file names
  452.         endfile                         * Get to end of file
  453.  CHECKAGAIN:                            *
  454.         unmarkblock                     * Clear last file name
  455.         find #42 "Fi" return "B"  return* Find file name
  456.         wordright                       * Move to space
  457.         wordright                       * Move to file name
  458.         markcolumn                      * Mark it
  459.         endline                         * Get all name in block
  460.         copy                            * Copy file name to scrap
  461.         EditFile                        * Get ready to load
  462.         CurrentFilename " "             * To force return *here*
  463.         Paste Return                    * Paste file name & do it!
  464.         cursorup                        * Go to next line
  465.  jfalse END:                            * No more file names? End
  466.  jump CHECKAGAIN:                       * Check again
  467.  END:                                   *
  468.         defaultwordset                  * Set default
  469. ***************************************** INITIALIZE FIND FOR SEARCH  |
  470.         DOS "set>c:$" return return     * Get SET output to tempfile  |
  471.         editfile "c:$" return           * Load tempfile               |
  472.         find  "FGS" return return      ** Find FGS in SET output      | v2.2
  473.         begline wordright dropanchor    * Mark first letter of search |
  474.                                         *  text                       |
  475.         endline cursorleft copy         * Copy search text to scrap   |
  476.         killfile quit                   * Kill/quit temp for next time|
  477.         Find paste return Escape        * Initialize find for F4      |
  478. *
  479. * 37 bytes Thu  09-06-1990  13:53:04
  480. * 83 bytes Sat  02-09-1991  10:47:23
  481.  
  482.  
  483.  
  484.  
  485. * ------------------------------------------------------------------------
  486. * @(8)  MACRO TO EXECUTE THE FindReplace ACROSS THE ENTIRE RING OF FILES
  487. *     ----------------------------------------------------------------
  488. *
  489. * See Kyle Watkin's alternate version below for more discussion.
  490.  
  491. @8      Macrobegin
  492.         Editfile '!' Return      * Insert -or- GoTo NUL File
  493.         Findreplace Pause Return * Allow user input of Find Item
  494.         Pause Return             * Allow user input of Replace Item
  495.         Pause Return             * Allow user input of Options
  496.         Begline Cursorright      * Put cursor in Col. 2 of NUL File
  497.         LOOP:                    * Main test loop
  498.             Nextfile             * Move to next files in Ring
  499.             Cursorleft           * Move cursor left (need for NUL test)
  500.             Jfalse DOIT:         * If couldn't move to left, it's not
  501.                                  * the NUL File AND cursor position
  502.                                  * has not changed -- GO with the
  503.                                  * FindReplace
  504.                                  *ELSE
  505.                                  * Check to see if in the NUL File
  506.             Cursorleft           * Move cursor left for NUL Test
  507.             Jfalse END:          * If couldn't move left -- We
  508.                                  * ARE in the NUL File and Need
  509.                                  * to END the Macro
  510.                                  *ELSE
  511.             Cursorright          * Move back to Col. 2 in NUL File
  512.         DOIT:                    * FindReplace Loop
  513.             Begfile              * Needed in case cursor is below Find
  514.             Repeatfind           * Do the FindReplace
  515.             Jtrue SAVE:          * If CHANGES are made -- SAVE the File
  516.             Quit                 * If NO CHANGES made  -- QUIT the File
  517.             Jump LOOP:           * Return to the Main Loop
  518.         SAVE:                    * Routine to Save a File with Changes
  519.             Savefile             * Save the file with CHANGES
  520.             Jump LOOP:           * Return to Main Loop
  521.         END:                     * Macro is DONE
  522.             Quit                 * Quit the NUL File
  523. *
  524. * 62 bytes Sat  09-15-1990  11:17:57 (K. Watkins version)
  525. * 41 bytes Sun  09-30-1990  20:32:55 (this version)
  526.  
  527.  
  528. * * ┌────────────────────────────────────────────────────────────────────┐
  529. * * │@(8)  MACRO TO EXECUTE THE FindReplace ACROSS ENTIRE RING OF FILES  │
  530. * * └────────────────────────────────────────────────────────────────────┘
  531. * *
  532. * * The following macro was written by Kyle Watkins of SemWare in
  533. * * response to my request for a macro to search/replace all loaded
  534. * * files, but also:
  535. * *         - save to disk only those files that had a replacement, and
  536. * *         - keep loaded  only those files that had a replacement made.
  537. * * It is an excellent and creative macro which I urge you to study
  538. * * because of the unique and powerful use of a NUL file as a
  539. * * place-marker.
  540. *
  541. * * ==============================================================================
  542. * * Date: 09-14-90 (11:49)           Number: 9940         SemWare Support BBS
  543. * *   To: TOM HOGSHEAD               Refer#: NONE
  544. * * From: KYLE WATKINS                 Read: NO
  545. * * Subj: ONCE AROUND THE FILE-RING    Conf: (0) Main Board
  546. * * ------------------------------------------------------------------------
  547. * * TH>I have been trying for several months to either modify the following
  548. * * TH>macro or come up with another way to search & replace all loaded
  549. * * TH>files but also to:
  550. * * TH>
  551. * * TH>        - save to disk only those files that had a replacement, and
  552. * * TH>        - keep loaded  only those files that had a replacement made.
  553. * *
  554. * * Hi Tom,
  555. * *     You may need to adjust this macro at the point where I quit the file
  556. * * if no replacements were made to it (The macro can be adjusted to save
  557. * * those files, if there were some pre-existing changes that were present
  558. * * before the macro was envolked). I wasn't sure what you wanted (my own
  559. * * preference is to retain other changes that I made before I envolked this
  560. * * macro -- BUT I wrote the macro to just Quit those files, since that is
  561. * * what I am guessing you want).
  562. * *     Basically, the macro will use the NUL file as a placeholder in the
  563. * * Ring-of-Files. With cursor manipulation, I will determine when you
  564. * * arrive at the NUL file again. Once you get back to the NUL file, the
  565. * * macro will end. Your starting point for the FindReplace throughout the
  566. * * entire Ring will be at the file immediately after the NUL file -- So if
  567. * * you do not have a NUL file already loaded, the starting point will be at
  568. * * the next file from the one that you are currently in. Otherwise, the
  569. * * starting point will be at the next file from the present location of the
  570. * * NUL file.
  571. * *     Note that I always return to the original cursor position, before
  572. * * the FindReplace is executed (allowing you to select any Option for the
  573. * * FindReplace routine).
  574. * *
  575. *
  576. * * ------------------------------------------------------------------------
  577. * *     MACRO TO EXECUTE THE FindReplace ACROSS THE ENTIRE RING OF FILES
  578. * *     ----------------------------------------------------------------
  579. * *
  580. * @8      Macrobegin
  581. *         Editfile 'NUL' Return    * Insert -or- GoTo NUL File
  582. *         Findreplace Pause Return * Allow user input of Find Item
  583. *         Pause Return             * Allow user input of Replace Item
  584. *         Pause Return             * Allow user input of Options
  585. *         Begline Cursorright      * Put cursor in Col. 2 of NUL File
  586. *                                  *
  587. *         LOOP:                    * Main test loop
  588. *                                  *
  589. *             Nextfile             * Move to next files in Ring
  590. *             Cursorleft           * Move cursor left (need for NUL test)
  591. *             Jfalse DOIT:         * If couldn't move to left, it's not
  592. *                                  * the NUL File AND cursor position
  593. *                                  * has not changed -- GO with the
  594. *                                  * FindReplace
  595. *                                  *
  596. *                                  *ELSE
  597. *                                  * Check to see if in the NUL File
  598. *                                  *
  599. *             Editfile
  600. *             'NUL ' Currentfilename Return * GoTo NUL File -- AND--
  601. *                                           * Preload File to Edit
  602. *                                           * Buffer so can Return
  603. *                                           * to Current File
  604. *                                  *
  605. *             Cursorleft           * Move cursor left for NUL Test
  606. *             Jfalse END:          * If couldn't move left -- We
  607. *                                  * ARE in the NUL File and Need
  608. *                                  * to END the Macro
  609. *                                  *
  610. *                                  *ELSE
  611. *             Cursorright          * Move back to Col. 2 in NUL File
  612. *                                  *
  613. *             Editfile
  614. *             Begline Delch Delch Delch Return  * Bring up EditFile Prompt
  615. *                                               * and delete NUL and
  616. *                                               * Return to File we left
  617. *                                  *
  618. *             Cursorright          * Restore Cursor to its previous
  619. *                                  * position and GO with the FindReplace
  620. *                                  *
  621. *         DOIT:                    * FindReplace Loop
  622. *                                  *
  623. *             Repeatfind           * Do the FindReplace
  624. *             Jtrue SAVE:          * If CHANGES are made -- SAVE the File
  625. *                                  *
  626. *             Quit                 * If NO CHANGES are made -- QUIT the
  627. *                                  * File
  628. *                                  *
  629. *             Jump LOOP:           * Return to the Main Loop
  630. *                                  *
  631. *                                  *
  632. *         SAVE:                    * Routine to Save a File with Changes
  633. *                                  *
  634. *             Savefile             * Save the file
  635. *             Jump LOOP:           * Return to Main Loop
  636. *                                  *
  637. *         END:                     * Macro is DONE
  638. *                                  *
  639. *             Quit                 * Quit the NUL File
  640. * *
  641. * * 62 bytes Sat  09-15-1990  11:17:57 (added TH)
  642. *
  643. *
  644. * *      ----------------------------------------------------------------
  645. * *     I hope this is what you need Tom. Feel free to optimize and alter
  646. * * the macro. The main Body of this macro can be used to allow any kind of
  647. * * ONE-TIME File Ring Sweep. I have already used the main body of the macro
  648. * * (with the neccessary adjustments) to Load all files that DO NOT cause a
  649. * * PRESS ESCAPE message -- So I hope it proves useful to you.
  650. * *
  651. * *                              --... ...--
  652. * * .......Kyle Watkins (SemWare Technical Support)
  653.  
  654.  
  655.  
  656.  
  657. * ┌────────────────────────────────────────────────────────┐
  658. * │@(9) Keep loaded only files with "found" text.          │
  659. * └────────────────────────────────────────────────────────┘
  660. *
  661. * This macro uses the same technique developed by Kyle Watkins in @8,
  662. * to keep loaded ONLY files with "found" text. No replacement or save
  663. * is made (@8 makes replacement and saves files with replacements, but
  664. * files without any replacement are QUIT from ring).
  665. *
  666. * Version 1.6 of this macro used RepeatFind in the DOIT loop. If that
  667. * version was executed more than once and the cursor was on the last
  668. * occurence of the search text in a file, RepeatFind would NOT find the
  669. * search text again, and the file was QUIT from the ring. Apparently
  670. * RepeatFind does NOT remember the "G" option with Find.
  671. *
  672. * This version replaces RepeatFind with Find "G". Now, if @9 is executed
  673. * more than once, any file with any occurence of the search text is
  674. * correctly kept loaded.
  675. *
  676. @9      Macrobegin
  677.         Editfile '!' Return      * Insert -or- GoTo NUL File
  678.         Find Pause Return "G"    * Allow user input of Find Item
  679.         Pause Return             * Allow user input of Options
  680.         Begline Cursorright      * Put cursor in Col. 2 of NUL File
  681.         LOOP:                    * Main test loop
  682.             Nextfile             * Move to next files in Ring
  683.             Cursorleft           * Move cursor left (need for NUL test)
  684.             Jfalse DOIT:         * If couldn't move to left, it's not
  685.                                  * the NUL File AND cursor position
  686.                                  * has not changed -- GO with the
  687.                                  * FindReplace
  688.                                  *ELSE
  689.                                  * Check to see if in the NUL File
  690.             Cursorleft           * Move cursor left for NUL Test
  691.             Jfalse END:          * If couldn't move left -- We
  692.                                  * ARE in the NUL File and Need
  693.                                  * to END the Macro
  694.                                  *ELSE
  695.             Cursorright          * Move back to Col. 2 in NUL File
  696.         DOIT:                    * Find Loop
  697.             Find Return "G" return * Do the Find
  698.             Jtrue LOOP:          * If FOUND   -- Return to Main Loop
  699.             Quit                 * If NO FIND -- QUIT the file
  700.             Jump LOOP:           * Return to the Main Loop
  701.         END:                     * Macro is DONE
  702.             Quit                 * Quit the NUL File
  703. *
  704. * 40 bytes Sun  09-30-1990  22:48:24
  705.  
  706.  
  707.  
  708.  
  709. * ^f1 and ^f2 macros are modifcations to macros written by Tim Farley
  710. * in BIGFIND.QM dated 8/21/89 and revised 9/6/89.
  711. *
  712. *------------------------------------------------------------
  713. * ^(f1_) Find multiple search text in current file, uses FGREP
  714. *------------------------------------------------------------
  715. *
  716. * Find all instances of a given string in current file, let the user
  717. * select one, hit return, and view line containing search string.
  718. * Change "c:" to ramdrive for faster operation.
  719. *
  720. * Uses Chris Dunford's excellent FGREP. Remember search string is
  721. * NOT case sensitive.
  722. *
  723. ^f1     MacroBegin                      *
  724.         UnmarkBlock DropAnchor          * Mark current file to return to
  725.                                         * later
  726.         EditFile "c:!" Return Quit      * Quit temp file if loaded
  727.                                         * Sets EditFile prompt for later
  728.         GotoBlockBeg                    * Return to where we were
  729.         UnmarkBlock                     * Unmark
  730.         DOS 'FGREP -L /'                * Prompt for search text
  731.         Pause                           *
  732.         '/>c:! '                        * Echo output to temp file
  733.         CurrentFilename Return Return   * Search current file
  734.         EditFile Return                 * Load temp file with found text
  735.         Pause                           * Pause to select line to view
  736.         BegLine WordRight MarkWord      * Mark found text line number
  737.         Copy                            * Copy line number to scrap
  738.         KillFile                        * Delete temp file from disk
  739.         PrevFile                        * Return to searched file
  740.         GotoLine Paste Return           * Goto found text line
  741.         MakeCtrOfScreen                 * Put on screen center to view
  742. *
  743. * 67 bytes Sat  02-16-1991  02:56:13
  744.  
  745.  
  746.  
  747.  
  748. *---------------------------------------------------------------
  749. * ^(f2_) Find multiple search text in current file, uses Dos FIND
  750. *---------------------------------------------------------------
  751. *
  752. * Find all instances of a given string in current file, let the user
  753. * select one, hit return, and view line containing search string.
  754. * Change "c:" to ramdrive for faster operation.
  755. *
  756. * Uses DoshFIND. Remember search string is case sensitive.
  757. *
  758. ^f2     MacroBegin                      *
  759.         UnmarkBlock DropAnchor          * Mark current file to return to
  760.                                         * later
  761.         EditFile "c:!" Return Quit      * Quit temp file if loaded
  762.                                         * Sets EditFile prompt for later
  763.         GotoBlockBeg                    * Return to where we were
  764.         UnmarkBlock                     * Unmark
  765.         Dos 'FIND /N "'                 * Prompt for search text
  766.         Pause '" '                      *
  767.         CurrentFilename                 * Search current file
  768.         '>c:!' Return Return            * Echo output to temp file
  769.         EditFile Return                 * Load temp file with found text
  770.         Pause                           * Pause to select line to view
  771.         BegLine WordRight MarkWord      * Mark found text line number
  772.         Copy                            * Copy line number to scrap
  773.         KillFile                        * Delete temp file from disk
  774.         PrevFile                        * Return to searched file
  775.         GotoLine Paste Return           * Goto found text line
  776.         MakeCtrOfScreen                 * Put on screen center to view
  777. *
  778. * 65 bytes Sat  02-16-1991  02:55:59
  779.  
  780.  
  781.  
  782. *┌───────────────────────────────────────────────────────────────────┐
  783. *│@(h) Finds first word on cursor line marked in document below      │
  784. *└───────────────────────────────────────────────────────────────────┘
  785. *
  786. *        @h macro has 2 steps:
  787. *
  788. *        1. Press @ and h at the same time. An ! shows at the
  789. *        end of the top line. Cursor down to desired line in Index.
  790. *
  791. *        2. Press Enter. The macro first erases the !, and
  792. *        then finds the first word on the cursor line in the document
  793. *        below marked with (...).
  794. *
  795. * See BOOK15.QM for more details.
  796. *
  797. @h macrobegin
  798.         unmarkblock                     * Unmark any marked blocks
  799.         begfile endline                 * Go to file begin endline
  800.         "!"                             * Put ! at endline
  801.         begline
  802.         find "!" return return begline  * Highlight !
  803.         pause                           * Pause for Index selection
  804.         wordright markword              * Mark first word on line
  805.         copy                            * Copy word to scrap buffer
  806.         begfile                         * Begfile
  807.         find "!" return return delch    * Find & delete !
  808.         endpara                         * Go to end of Index
  809.         makectrofscreen                 * Cursor line center of window
  810.         find "(" paste ")"
  811.         return "I" return               * Find first marked word in doc
  812.  jfalse NOMARK:
  813.         begline                         * If mark found go to begline
  814.  jump END:
  815.  NOMARK:
  816.         begfile                         * If no mark found go to begfile
  817.  END:
  818. *
  819. * 47 bytes Fri  09-14-1990  14:06:26
  820.  
  821.  
  822.  
  823.  
  824. * =========================================================================
  825. * Date: 10-29-90 (13:26)           Number: 3156         SemWare Support BBS
  826. *   To: EDGAR ESTRADA              Refer#: 3155
  827. * From: TIM FARLEY                   Read: YES
  828. * Subj: Qedit                        Conf: (21) ILink
  829. * ------------------------------------------------------------------------
  830. * EE>I'm interested in finding out how to get Qedit to wordwrap while using
  831. * EE>the right cursor key.
  832. *
  833. * You mean like WordStar does, where it won't let the cursor move
  834. * out into the "empty space" to the right of the lines?
  835. *
  836. * Here are some macros to do this in 2.1:
  837. *
  838. * *
  839. * * Left and Right cursor definitions that wrap to previous/next
  840. * *                line like WordStar does
  841. * *
  842. *-------------------------------------
  843. * (CursorLeft) Macro   (line added TH)
  844. *-------------------------------------
  845. *
  846. cursorleft    MacroBegin     
  847.               CursorLeft     * try to go left
  848.               JTrue end:     * succeed!  then we are done
  849.               CursorUp       * else try to go to prev line
  850.               JFalse end:    * if fail, then at top of file. done.
  851.               EndLine        * jump to end of previous line.
  852.             end:
  853. *
  854. * 13 bytes Mon  10-29-1990  19:33:07 (line added TH)
  855.  
  856.  
  857. *-------------------------------------
  858. * (CursorRight) Macro  (line added TH)
  859. *-------------------------------------
  860. *
  861. cursorright   MacroBegin
  862.               EndLine        * are we at end of line?
  863.               JFalse down:
  864.               PrevPosition   * back to where we were
  865.               CursorRight    * and right one
  866.               Jump end:
  867.             down:
  868.               CursorDown     * try to go to next line
  869.               JFalse end:
  870.               BegLine
  871.             end:
  872. *
  873. * 18 bytes Mon  10-29-1990  19:32:57 (line added TH)
  874.  
  875. * NOTE:  You must have the latest registered release of QEdit 2.1
  876. *        to use these macros.  Otherwise you will experience odd
  877. *        side-effects in the menus and other special contexts where
  878. *        the arrow keys have meaning.
  879. *
  880. * There will be an easier way to achieve this behavior in the next
  881. * release of QEdit.
  882. *
  883. * --Tim Farley
  884. *   SemWare Technical Support
  885.  
  886.  
  887. *------------ (Single line macros for QCONFIG.DAT) ----------------
  888.  
  889. * cursorleft MacroBegin CursorLeft JTrue Label0: CursorUp JFalse Label1: EndLine Label0: Label1:
  890.  
  891. * cursorright MacroBegin EndLine JFalse Label0: PrevPosition CursorRight Jump Label1: Label0: CursorDown JFalse Label2: BegLine Label1: Label2:
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898. * Here are four macros that are variations of wordleft and wordright.
  899. * Macros @a and @f position the cursor on the first word delimiter
  900. * after wordleft and wordright. The cursor position will be the space
  901. * following the word as long as no other word delimiter like "," and
  902. * *"." etc immediately follows the word. Macros @a and @f unmark any
  903. * previously marked block, but I don't know any other way to keep this
  904. * from happening. Macros ^a and ^f do almost what wordleft and
  905. * wordright do except the cursor does not stop at the end of a line.
  906. *
  907. *          @a Moves cursor to first word delimiter after wordleft
  908. *          @f Moves cursor to first word delimiter after wordright
  909. *          ^a Moves cursor to first character of wordleft
  910. *          ^f Moves cursor to first charactetr of wordright
  911.  
  912. *┌──────────────────────────────────────────────────────────────┐
  913. *│@(a) Moves cursor to first word delimiter after wordleft      │
  914. *└──────────────────────────────────────────────────────────────┘
  915. @a  macrobegin                          *
  916.     wordleft wordleft                   * Move wordleft twice
  917.     endline                             * Test if on eol
  918.  jtrue NO_EOL:                          * If not on eol, tests true
  919.     wordleft                            * If on eol, goto wordleft
  920.     jump GOTOPOS:                       * Go to end of word
  921.  NO_EOL: prevposition                   * If not at eol, return
  922.  GOTOPOS:                               * to where we were
  923.     markword gotoblockend unmarkblock   * Get to end of word
  924. *
  925. * 18 bytes Mon  10-22-1990  11:32:21
  926.  
  927. *┌─────────────────────────────────────────────────────────────┐
  928. *│@(f) Moves cursor to first word delimiter after wordright    │
  929. *└─────────────────────────────────────────────────────────────┘
  930. @f  macrobegin                          *
  931.     wordright                           * Move wordright
  932.     endline                             * Test if on eol
  933.  jtrue NO_EOL:                          * If not on eol, tests true
  934.     wordright                           * If on eol, goto wordright
  935.     jump GOTOPOS:                       * Go to end of word
  936.  NO_EOL: prevposition                   * If not at eol, return to
  937.  GOTOPOS:                               * where we were
  938.     markword gotoblockend unmarkblock   * Get to end of word
  939. *
  940. * 17 bytes Mon  10-22-1990  11:32:32
  941.  
  942. *┌─────────────────────────────────────────────────────────────┐
  943. *│^(a_) Moves cursor to first character of wordleft            │
  944. *└─────────────────────────────────────────────────────────────┘
  945. ^a  macrobegin                          *
  946.     wordleft                            * Move wordleft
  947.     endline                             * Test if on eol
  948.  jtrue NO_EOL:                          * If not on eol, tests true
  949.     wordleft                            * If on eol, goto wordleft
  950.     jump GOTOPOS:                       * End macro
  951.  NO_EOL: prevposition                   * If not at eol, return to
  952.  GOTOPOS:                               * where we were
  953. *
  954. * 14 bytes Mon  10-22-1990  11:53:14
  955.  
  956. *┌─────────────────────────────────────────────────────────┐
  957. *│^(f_) Moves cursor to first character of wordright       │
  958. *└─────────────────────────────────────────────────────────┘
  959. ^f macrobegin                           *
  960.     wordright                           * Move wordright
  961.     endline                             * Test if on eol
  962.  jtrue NO_EOL:                          * If not on eol, tests true
  963.     wordright                           * If on eol, goto wordright
  964.     jump GOTOPOS:                       * End macro
  965.  NO_EOL: prevposition                   * If not at eol, return to
  966.  GOTOPOS:                               * where we were
  967. *
  968. * 14 bytes Mon  10-22-1990  11:53:03
  969.  
  970.  
  971.  
  972. * (F4)
  973. f4      RepeatFind
  974.  
  975.  
  976. * (F5)
  977. f5      PrevFile
  978.  
  979. * (F6)
  980. f6      NextFile
  981.  
  982.  
  983. * (VERSION) HISTORY:
  984. *
  985. *    1.0a - Corrected @5 to use @SRCH-FG.lst, not SRCH.lst.
  986. *    1.0b - Modified to not use optional batch file.
  987. *         - Removed @5.
  988. *    1.0c - Added Alt_0 for search/replace from command line.
  989. *         - Modified SRC.BAT, @1 & @4 for case sensitive search.
  990. *         - Modified @4 to re-load search files after replacement.
  991. *         - Corrected @1 byte size.
  992. *    1.0d - Removed redundant lines from @0, shortened 31 bytes
  993. *         - added START-SR.BAT for quick start.
  994. *         - Changed c:srch.ql to c:$.qm in macros and batch files.
  995. *           so as to not overwrite qsrch.ql supplied in SRCHxx.ZIP.
  996. *         - Added killfile c:$.ql to @1 and @4.
  997. *         - Changed FC0 to fc0 in macros and batch files for better
  998. *         - visibility.
  999. *    1.0e - Added @5 for prompted replacement from command line
  1000. *         - Added @6 for prompted replacement while editing
  1001. *         - Added F4/F6 repeatfind/nextfile
  1002. *         - Modified @4 for single search/replacement text input.
  1003. *    1.0f - Modified SR.BAT and SRC.BAT
  1004. *    1.0g - Modified SR.BAT, SRC.BAT and START-SR.BAT.
  1005. *         - Removed INPUT.COM and INPUT.DOC pending author
  1006. *           permission to include.
  1007. *    1.0h - Removed SRC.BAT, Modified all macros and batch files for
  1008. *           NON-case sensitive search
  1009. *         - Added @7 and SRL.BAT to only load files with search text,
  1010. *           no replacement
  1011. *         - Modified SR.BAT to load SRCHxx.MAC on start up.
  1012. *    1.0i - Modified @3 to re-load files after replacement.
  1013. *         - Modified all macros and batch files for NON-case
  1014. *           sensitive search, some had not been changed in v1.0h.
  1015. *         - Corrected some macro byte sizes
  1016. *    1.0j - Modified comments in SR.BAT, SRL.BAT
  1017. *         - Modified @7 to about half the size and twice the speed.
  1018. *         - Included a PCED synonym to search/load files with @7.
  1019. *    1.1  - Corrected @7 macro size
  1020. *         - Removed savefile from old @0
  1021. *         - Modified @0 to load FGREP found text, after replacement.
  1022. *         - Added [copy c:$.ql c:!] to SR.BAT
  1023. *         - Changed FGREP "-f0" to "-f" in SR.BAT, loads found text
  1024. *         - Removed @5, same thing can be done with @1/2 and
  1025. *           manual search/replace.
  1026. *         - Modified srch.ql load filelist for quicker file loading.
  1027. *    1.2  - Changed "c:$.ql" to "c:!" in macros @1/4/6, shortened
  1028. *           each macro 12 bytes.
  1029. *    1.3  - Modified @3 to be smaller and faster.
  1030. *    1.4  - Changed "*F" to #42 "Fi" in @0 and @7 to be able to load
  1031. *           this file and SRL.QM with SR and SRL.
  1032. *         - Modified SRL.BAT to accept SRL [search text] from command
  1033. *           as long as [search text] is a SINGLE word.
  1034. *         - Added altwordset to @0 and @7 to correctly load file names
  1035. *           containing the following characters: !#$%&'(),-./@{}~
  1036. *         - Changed .lst and .ql files.
  1037. *    1.5  - Removed E:\up from SR.BAT & SRL.BAT
  1038. *    1.6  - Added @8 and @9, modified SR.BAT and SRL.BAT.
  1039. *         - @3 was deleting first character in loaded files,
  1040. *           corrected.
  1041. *    1.7  - Added @h to help locate items or macros from Index.
  1042. *         - Added @5.
  1043. *         - Removed @3, same thing is done better by @8.
  1044. *         - Removed @4 and @6, same thing is done better with @5.
  1045. *         - Modified @0 to use the "Once-Around the ring"
  1046. *           technique developed by Kyle Watkins of SemWare.
  1047. *         - Modified SR.BAT and SRL.BAT.
  1048. *    1.8  - Replaced RepeatFind w/ Find "G" in @9.
  1049. *         - Modified SR.BAT and SRL.BAT.
  1050. *    1.9  - Changed Find initialization in @5 and @0.
  1051. *         - Modified START-SR.BAT for no search/replace text.
  1052. *         - Modified @5, @8, @9 and @0 to be shorter and faster.
  1053. *         - Moved SET >c:$ from @0 macro to SR.BAT batch file.
  1054. *    2.0  - Added @a, @f, ^a, ^f variations of wordleft & wordright.
  1055. *         - Changed quick start file from START-SR to START.
  1056. *    2.1  - Added new key definitions for CursorLeft and CursorRight
  1057. *           to wrap cursor to previous/next line like Wordstar does.
  1058. *         - Changed SEARCH file names to SRCH.
  1059. *    2.1a - Corrected Index Use instructions.
  1060. **   2.2  - Modified @7 (SRL.QM) to highlight first occurence of
  1061. *           search text.
  1062. *         - Modified SR.BAT and SRL.BAT to search all files in current
  1063. *           directory if SRCH-FG.LST does NOT exist in directory.
  1064. *         - Changed FGREP search target delimeter from " to / in order
  1065. *           to find strings with " (@1, @5, SR.BAT, SRL.BAT).
  1066. *         - Added F5 - PrevFile.
  1067. *         - Added ^f1 & ^f2 to find multiple search text in current file
  1068. *           using FGREP or Dos FIND. Original macros by Tim Farley.
  1069.  
  1070. * Tom Hogshead  Sat  02-16-1991
  1071.